numbers = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}
a = 0
S = 0

A=input().split()
print(A)
if len(A) != 3:
    print("Wrong input")
else:
    for words in A:
        if words not in numbers:
            print("Wrong input")
            break
for i in range(10):
    if numbers[i] == A[0]:
        S+=i*100
for i in range(10):
    if numbers[i] == A[1]:
        S+=i*10
for i in range(10):
    if numbers[i] == A[2]:
        S+=i*1
print(S)
    
        
        
        



    
        
        
            
